import { useState } from 'react'
import reactLogo from './assets/react.svg'
import viteLogo from '/vite.svg'
import './App.css'
import routes from './router/index';
import { useRoutes } from "react-router-dom"
import { NavLink } from 'react-router-dom'

function App() {
  // hooks
  const routerView = useRoutes(routes)

  return (
    <div className="App">
      <header>
        <NavLink to="/home">Home</NavLink> |
        <NavLink to="/about">About</NavLink> |
        <NavLink to="/user">User</NavLink>
      </header>
      {routerView}
    </div>
  )


}

export default App
